package org.example.springboot.DTO;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;
import java.sql.Date;

/**
 * 图书数据传输对象
 */
@Data
@Schema(description = "图书数据传输对象")
public class BookDTO {
    @Schema(description = "图书ID")
    private Long id;
    
    @Schema(description = "ISBN编号")
    @NotBlank(message = "ISBN编号不能为空")
    @Size(max = 20, message = "ISBN编号长度不能超过20个字符")
    private String isbn;
    
    @Schema(description = "图书标题")
    @NotBlank(message = "图书标题不能为空")
    @Size(max = 100, message = "图书标题长度不能超过100个字符")
    private String title;
    
    @Schema(description = "作者")
    @Size(max = 100, message = "作者长度不能超过100个字符")
    private String author;
    
    @Schema(description = "出版社")
    @Size(max = 100, message = "出版社长度不能超过100个字符")
    private String publisher;
    
    @Schema(description = "出版日期")
    private Date publishDate;
    
    @Schema(description = "分类ID")
    private Long categoryId;
    
    @Schema(description = "图书描述")
    private String description;
    
    @Schema(description = "封面图片URL")
    private String coverUrl;
    
    @Schema(description = "库存数量")
    private Integer stock;
    
    @Schema(description = "状态(0:下架,1:上架)")
    private Integer status;
    
    @Schema(description = "分类名称")
    private String categoryName;
} 